<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>学习 vue</title>
		<script src="../vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<!-- 
			小结
		 -->
		<!-- 创建容器 -->
		<div id="root">
		姓:<input type="text" name="" id="" v-model="firstName" />
		名:<input type="" name="" id="" v-model="lastName" />
		全名:<span>{{fullName()}}</span>
		</div>
		
		<script type="text/javascript">
			Vue.config.productionTip=false
			
			//创建vue实例
			new Vue({
				el:'#root',
				data:{
					firstName:'张',
					lastName:'三'
				},
				methods:{
					fullName(){
						console.log('-fullname-')
						return this.firstName+'-'+this.lastName
					}
				}
			})
		</script>
	</body>
</html>
